﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Donate.aspx.vb" Inherits="Donate" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
    <style type="text/css">
        .style1
        {
            width: 400px;
        }
    </style>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="mainContent">
    <br />
    <h2>Donate</h2>
    <p>Whether you’re here to make a donation in honor of a friend or family 
        member,donating helps fund research and assist families in need. 100% of the 
        proceeds go to breast cancer research foundation.&nbsp;</p>
        <p>&nbsp;</p>

        <h1>Total Donations(YTD):&nbsp; 
            <asp:Label ID="lblDonations" runat="server" 
                BorderStyle="Solid" ForeColor="Green" 
                ToolTip="Total Donations To Date" Width="200px" BackColor="White" 
                style="text-align: right" BorderColor="#999999" BorderWidth="1px"></asp:Label>
            <asp:AccessDataSource ID="AccessDataSource2" runat="server" 
                DataFile="~/App_Data/GotPink.accdb" SelectCommand="SELECT Sum(OrderLine.Qty*OrderLine.Amount) AS TotalDonation
FROM Orders INNER JOIN OrderLine ON Orders.OrderID = OrderLine.OrderID
WHERE Year(OrderDate) = Year(Now()) AND OrderLine.ProductID=16
"></asp:AccessDataSource>
        </h1>
    </div>
    <br />
    <div id="wrapper">
<asp:UpdatePanel ID="ajxDonationAmount" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <table style="width: auto;" cellpadding="20" 
            cellspacing="10" border="0" style="text-align: Center">
            
            <tr>
            <td class="style1">
                <h2>Donation Amount</h2>
            </tr>
            
            <tr>
            <td class="style1">
                <asp:RadioButtonList ID="rblDonations" runat="server" CellPadding="0" 
                    CellSpacing="10" Font-Names="Arial" Font-Size="12" ForeColor="#363636" 
                    RepeatDirection="Horizontal" ToolTip="Select donation amount" 
                    AutoPostBack="True">
                    <asp:ListItem Value="10">$10</asp:ListItem>
                    <asp:ListItem Value="25">$25</asp:ListItem>
                    <asp:ListItem Value="50">$50</asp:ListItem>
                    <asp:ListItem Value="75">$75</asp:ListItem>
                    <asp:ListItem>Other</asp:ListItem>
                </asp:RadioButtonList>                                
                <asp:RequiredFieldValidator ControlToValidate="rblDonations" CssClass="validate" Display="Dynamic" ID="vldReqDonate" runat="server" ErrorMessage="Select a Donation Amount" />
            </tr>
            <tr>
                <td class="style1">
                 <span style="font-size:12pt;">$&nbsp;</span><asp:TextBox ID="txtDonationAmount" Enabled="false" runat="server" Width="150px" Height="20px" />
                <asp:RequiredFieldValidator ControlToValidate="txtDonationAmount" CssClass="validate" Display="Dynamic" ID="vldReqDonateTxt" runat="server" ErrorMessage="Enter a Donation Amount" />     
                <asp:CompareValidator ControlToValidate="txtDonationAmount" CssClass="validate" Display="Dynamic" Type="Currency" Operator="GreaterThan" ValueToCompare="0" ID="vldComDonateTxt" runat="server" ErrorMessage="Enter a valid amount" />
                </td>
            </tr>
            
            <tr>
                <td class="style1">
                    <asp:Button ID="btnDonateToCart" runat="server" Height="30px" 
                        Text="Add To Cart" Width="168px" />
                </td>
            </tr>
            
         </table>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server"></asp:AccessDataSource>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="rblDonations" 
            EventName="SelectedIndexChanged" />
    </Triggers>
</asp:UpdatePanel>        
        
        
        <br />
        
        
        
        
    </div>
</asp:Content>

